Inbox_0.test.js ➔ drive   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
nop 0
1
const assert = require('assert');
2
const ganache = require('ganache-cli');
3
const Web3 = require('web3')
4
const web3 = new Web3(ganache.provider());
0 ignored issues
show
Unused Code introduced by
The constant web3 seems to be never used. Consider removing it.
Loading history...
5
class Car {
6
  park() {
7
    return 'Stopped';
8
  }
9
  drive() {
10
    return 'gogo';
11
  }
12
}
13
14
let car;
15
16
beforeEach(() => {
17
  console.log(' before each test:');
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
18
  car = new Car();
19
});
20
21
describe('Nguyen test Car class', () => {
22
  it('can park', () => {
23
    assert.equal(car.park(), 'Stopped');
24
  } );
25
26
  it('can drivde', () => {
27
    assert.equal(car.drive(), 'gogo');
28
  } );
29
} )
30